package march.test_3_26;

import java.util.Scanner;

public class TestMain1 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNextLine()) {
            String str1 = scanner.next();
            String str2 = scanner.next();
            int l2 = str2.length();
            int count = 0;
            for(int i = 0; i < str1.length() - l2+1; i++) {
                if (str1.indexOf(str2,i) >= 0) {
                    System.out.println(str1.indexOf(str2,i));
                    i += (l2-1);
                    count++;
                }
            }
            System.out.println(count);
        }
    }
}
